package com.suny.result;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResponseCode {

    @Schema(description = "调用成功")
    SUCCESS("0000", "调用成功"),
    @Schema(description = "调用失败")
    UN_ERROR("0001", "调用失败"),
    @Schema(description = "非法参数")
    ILLEGAL_PARAMETER("0002", "非法参数"),
    @Schema(description = "唯一索引冲突")
    INDEX_DUP("0003", "唯一索引冲突"),
    @Schema(description = "状态值无效")
    STATUS_INVALID("0004", "状态值无效"),
    ;

    private String code;
    private String info;

    @AllArgsConstructor
    @NoArgsConstructor
    @Getter
    public enum Login {
        TOKEN_ERROR("0003", "登录权限拦截"),

        ;

        private String code;
        private String info;
    }

}
